	
<ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
	<li class="active"><a href="#red" data-toggle="tab">Thông tin website</a></li>
	<li><a href="#orange" data-toggle="tab">Slide</a></li>	
	<li><a href="#yellow" data-toggle="tab">Bài viết</a></li>	
</ul>

<div id="my-tab-content" class="tab-content">
	<!-- Thông tin website -->
	<div class="tab-pane active" id="red">
		<h1></h1>
		<form class="form-horizontal" role="form" method="post" action="<?=site_url('setting/update') ?>" enctype="multipart/form-data">  
	        <div class="form-group">
	          <label for="inputEmail3" class="col-sm-3 control-label">Tiêu đề website</label>
	          <div class="col-sm-3">
	            <input id="codeInput" type="text" name="web_title" class="form-control" placeholder="{web title}" value="<?=$setting->web_title; ?>" required autofocus>
	          </div>
	        </div> 
	        <div class="form-group">
	          <label for="inputEmail3" class="col-sm-3 control-label">Keywords</label>
	          <div class="col-sm-3">
	            <input id="codeInput" type="text" name="keyword" class="form-control" placeholder="{keyword}" value="<?=$setting->keyword ?>" required autofocus>
	          </div>
	        </div> 
	        <div class="form-group">
	          <label for="inputEmail3" class="col-sm-3 control-label">Meta-data</label>
	          <div class="col-sm-3">
	            <input id="codeInput" type="text" name="metadata" class="form-control" placeholder="{meta-data}" value="<?=$setting->metadata; ?>" required autofocus>
	          </div>
	        </div> 
	        <div class="form-group">
	          <label for="inputEmail3" class="col-sm-3 control-label">Logo</label>
	          <div class="col-sm-8">
	          	<?php 
		            if(!empty($setting->logo))
		            { 
		              echo '<img src="'.base_url('uploads/image/slide/'.$setting->logo).'" class="img-thumbnail" style="width: 30%">';
		            }
		            else
		            {
		              echo '<img src="http://placehold.it/361x84" class="img-thumbnail" style="width: 30%">';
		            }
		        ?>
	          </div>    
	        </div>
	        <div class="form-group">
	          <label for="inputEmail3" class="col-sm-3 control-label">Tải hình</label>
	          <div class="col-sm-5">
	            <input type="file" id="exampleInputFile" name="userfile">
	            <p class="help-block"></p>
	          </div>
	        </div>
	        <div class="form-group">
	          <div class="col-sm-offset-2 col-sm-10">
	            <button type="submit" name="updateBtn" value="update_value" class="btn btn-primary">Cập nhật</button>	            
	          </div>
	        </div>
	    </form>
	</div>

	<!-- Slide hình -->
	<div class="tab-pane" id="orange">
		<h1></h1>
		<form class="form-horizontal" role="form" method="post" action="<?=site_url('setting/slide') ?>" enctype="multipart/form-data">  	        
	        <div class="form-group">
	          <label for="inputEmail3" class="col-sm-3 control-label">Logo</label>
	          <div class="col-sm-8">
	          	<?php 
		            if(!empty($slide->slide))
		            { 
		              echo '<img src="'.base_url('uploads/image/slide/'.$slide->slide).'" class="img-thumbnail" style="width: 100%">';
		            }
		            else
		            {
		              echo '<img src="http://placehold.it/2000x270" class="img-thumbnail" style="width: 100%">';
		            }
		        ?>
	          </div>    
	        </div>
	        <div class="form-group">
	          <label for="inputEmail3" class="col-sm-3 control-label">Tải hình</label>
	          <div class="col-sm-5">
	            <input type="file" id="exampleInputFile" name="userfile">
	            <p class="help-block"></p>
	          </div>
	        </div>
	        <div class="form-group">
	          <div class="col-sm-offset-2 col-sm-10">
	            <button type="submit" name="updateBtn" value="update_value" class="btn btn-primary">Cập nhật</button>	            
	          </div>
	        </div>
	    </form>
	</div>	

	<!-- Slide hình -->
	<div class="tab-pane" id="yellow">
		<h1>Bài viết</h1>
		<p>
			<div class="pull-right">
				<a href="<?=site_url('news/add') ?>" class="btn btn-primary">Tạo bài viết</a>	            
			</div>
		</p>

		<div class="table-responsive">
        <table class="table table-bordered table-striped table-hover">
          <thead>
            <tr class="success" align="center">
              <td>#</td>                             
              <td>Tiêu đề</td>              
              <td>Thao tác</td>                   
            </tr>
          </thead>
          <tbody>      
            <?php 
              $i = 1;     
              foreach ($news as $row): 

                echo '<tr align="center">
                    <td>'.$i.'</td>              
                    <td>'.$row->title.'</td>                                        
                    <td><a href="'.site_url('news/edit/'.$row->id).'" class="btn btn-primary"><span class="glyphicon glyphicon-pencil"></span> Chỉnh sửa</a></td>                            
                    </tr>';               
                $i++;
              endforeach;
            ?>
          </tbody>
        </table>        
      </div> 

	</div>
</div>